package DAO;

import java.sql.SQLException;
import java.sql.Connection;
import java.sql.DriverManager;

public class CriaConexao {
	public static Connection getConexao() throws SQLException{
		try{
			Class.forName("com.mysql.jdbc.Driver");
			System.out.println("Conectado ao MySQL...");
			return DriverManager.getConnection("jdbc:mysql://localhost/projesa", "root", "admin");
		}catch(ClassNotFoundException e){
			throw new SQLException(e.getMessage());
		}
    }
}